<template>
	<view>
		<view class="tui-timeaxis-item" >
		
			
				<slot  name="content">
						<view class="tui-node" :style="{backgroundColor:backgroundColor}">
							<tui-icon name="check" color="#fff" :size="index" :bold="true"></tui-icon>
						</view>
				</slot>
				
				
				<view class="tui-timeaxis-node" :style="{backgroundColor:backgroundColor}">
					<slot  name="node">
						
					</slot>
				</view>
			
		</view>
	
	</view>
</template>

<script>
	export default {
		name: "tuiTimeaxisItem",
		props: {
			//节点背景色
			backgroundColor: {
				type: String,
				default: "#fafafa"
			},
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {

			};
		},
		onShow:function(){
			let that = this;
			console.log(2222)
		},
		onLoad: function (options)  {
			console.log(333)
		}
	}
</script>

<style scoped>
	.tui-timeaxis-item {
		position: relative;
		width: 100%;
		display: flex;
		flex-direction: column;
		margin-bottom: 25px;
	}

	.tui-timeaxis-node {
		position: absolute;
		top: 0;
		left: -20px;
		transform-origin: 0;
		transform: translateX(-50%);
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 99;
		background-color: #fafafa;
		font-size: 24rpx;
	}
</style>
